//
//  tipTableViewCell.m
//  INAlienLand
//
//  Created by dllo on 15/7/9.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "tipTableViewCell.h"



#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@implementation tipTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.touxiang = [[UIImageView alloc]init];
        self.labelcontent = [[UILabel alloc]init];
        self.labelcontent.numberOfLines = 3;
        self.labelname = [[UILabel alloc]init];
        self.labeltime = [[UILabel alloc]init];
        self.labeltime.font = [UIFont systemFontOfSize:10];
        self.labellev = [[UILabel alloc]init];
        self.labelrate = [[UILabel alloc]init];
        [self.contentView addSubview:self.touxiang];
        [self.contentView addSubview:self.labeltime];
        [self.contentView addSubview:self.labelname];
        [self.contentView addSubview:self.labelcontent];
        [self.contentView addSubview:self.labelrate];
        [self.contentView addSubview:self.labellev];

    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.touxiang.frame= CGRectMake(5, 5, WIDTH/10, HEIGHT/3);
    self.labelname.frame= CGRectMake(WIDTH/10+5+2, 5, WIDTH/10*4, HEIGHT/6);
    self.labellev.frame = CGRectMake(WIDTH/10*6, 5, WIDTH/10, HEIGHT/6);
    self.labeltime.frame = CGRectMake(WIDTH/10*8, 5, WIDTH/10*2, HEIGHT/6);
    self.labelrate.frame = CGRectMake(WIDTH/10+5+2, HEIGHT/6+5+2, WIDTH/10*5, HEIGHT/6);
    self.labelcontent.frame = CGRectMake(5, HEIGHT/3+2, WIDTH-10, HEIGHT/3*2);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
